﻿using System;

using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using JWXH.XH.Droid.pages;
using Plugin.Toasts;
using Xamarin.Forms;

namespace JWXH.XH.Droid
{
    [Activity(Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        protected override void OnCreate(Bundle bundle)
        {
            ScreenSize.CurrHeight = Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density;
            ScreenSize.CurrWidth = (Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density);

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);

            DependencyService.Register<ToastNotification>();
            ToastNotification.Init(this, new PlatformOptions() { SmallIconDrawable = Android.Resource.Drawable.IcDialogInfo });
            LoadApplication(new App());

            new Com.Example.Huanghx.Androidlib.Utility.DisplayInfo(Application).ShowToast();
            //StartActivity(typeof(GaodeMapActivety));
        }
    }
}

